<?php

require_once "../include/connectionHandlers/database/IDataTable.php";
require_once "../include/connectionHandlers/database/AbstractDataTable.php";

class Image extends AbstractDataTable{

protected $primaryKey = "image_id";
protected $tableName = "nic_image";

	public function insert($parameters)
	{
		$imageId = parent::insert($parameters);
		if($imageId === false)
		{
			return parent::select("image_url", $parameters);
		}
		else return $imageId;
	}
	
	public function selectAllImageUrls()
	{
		$urlArray = null;
		$imageId = parent::selectAll();
		foreach($imageId as $key=>$value)
		{
			$urlArrayarray($key)=$valuearray("image_url");
		}
		return $urlArray;
	}
}
?>